<!DOCTYPE html>
 <html>
 <head>
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 <% include("/view/console/common/css.html"){}	%>

 <title></title>
 </head>
 <body>
 <div class="zq-form">
 <form name="wnLnglatAutomaticNew_form"  id="wnLnglatAutomaticNew_form" class="form-horizontal" style="margin-bottom: 70px;">
   <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">设备</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="deviceId" id="deviceId" class="form-control" check-type="required number" value='${wnLnglatAutomaticNew.deviceId!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label"></label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="lng" id="lng" class="form-control" check-type="required" value='${wnLnglatAutomaticNew.lng!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label"></label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="lat" id="lat" class="form-control" check-type="required" value='${wnLnglatAutomaticNew.lat!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">高程</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="height" id="height" class="form-control" check-type="required" value='${wnLnglatAutomaticNew.height!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">速度</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="speed" id="speed" class="form-control" check-type="required" value='${wnLnglatAutomaticNew.speed!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">方向</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="orentation" id="orentation" class="form-control" check-type="required number" value='${wnLnglatAutomaticNew.orentation!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">ab线id</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="abLineId" id="abLineId" class="form-control" check-type="required number" value='${wnLnglatAutomaticNew.abLineId!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">工作幅宽</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="workWidth" id="workWidth" class="form-control" check-type="required number" value='${wnLnglatAutomaticNew.workWidth!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">控制方式</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="controlType" id="controlType" class="form-control" check-type="required" value='${wnLnglatAutomaticNew.controlType!}' >
 </div>
  </div>
 <div class="form-group" >
 <label class="col-sm-2 col-xs-2 control-label">农机具</label>
 <div class="col-sm-6 col-xs-6">
 <input  type="text"  name="machinesTool" id="machinesTool" class="form-control" check-type="required" value='${wnLnglatAutomaticNew.machinesTool!}' >
 </div>
  </div>
 
   <input type='hidden' name='id' id='id' value='${wnLnglatAutomaticNew.id!}'><input type='hidden' name='common_token' id='common_token' value='${common_token!}'>
 </form>
  <nav class="navbar navbar-default navbar-fixed-bottom" style="text-align: right">
  <a href="#" class="btn btn-success" style="margin: 10px"  onclick='saveZqForm()'>保存 </a>

  </nav>
 </div>
 <% include("/view/console/common/js.html"){} 	%>
 <script type='text/javascript' src='/view/console/wnLnglatAutomaticNew/wnLnglatAutomaticNewForm.js'></script>
 <script>

     layui.use(['layer','laydate'], function(){

     });
     $(function($) {
      /*开启表单验证*/
         $("#wnLnglatAutomaticNew_form").validation();

     });
     /*保存*/
     function saveZqForm(){
         if ($("#wnLnglatAutomaticNew_form").valid() == false) {
             return false;
         }
         var formObject=new Object();
         formObject.deviceId=$('#deviceId').val()==''?null:$('#deviceId').val();
         formObject.lng=$('#lng').val()==''?null:$('#lng').val();
         formObject.lat=$('#lat').val()==''?null:$('#lat').val();
         formObject.height=$('#height').val()==''?null:$('#height').val();
         formObject.speed=$('#speed').val()==''?null:$('#speed').val();
         formObject.orentation=$('#orentation').val()==''?null:$('#orentation').val();
         formObject.abLineId=$('#abLineId').val()==''?null:$('#abLineId').val();
         formObject.workWidth=$('#workWidth').val()==''?null:$('#workWidth').val();
         formObject.controlType=$('#controlType').val()==''?null:$('#controlType').val();
         formObject.machinesTool=$('#machinesTool').val()==''?null:$('#machinesTool').val();
         formObject.id=$('#id').val()==''?null:$('#id').val();

         var formObjectJson = JSON.stringify(formObject);
         zqPost("/console/wn_lnglat_automatic_new/save",
             {
                 formObjectJson :formObjectJson,
                 common_token :$("#common_token").val()
             }, function(data) {
                 layer.alert(data.message, {skin: 'layui-layer-molv',closeBtn: 0 }, function(){
                     parent.$("#wnLnglatAutomaticNew").bootstrapTable("refresh");
                     parent.layer.closeAll();
                 });

             });
     }
 </script>
 </body>
